class ResetpasswordController < ApplicationController

  def index
    # render "fail" unless params[:token]
    resource = ResetPasswordToken.find_by(resetToken: params[:token])
    unless resource
      render "fail"
      return
    end
    if resource.expiredate < DateTime.now
      render "fail"
      return
    else
      # render entry password page
      # render "password"
      edit_user_registration_path
    end




    # need to check time also

    # else


    # end




  end

  def change_password

  end

end
